package com.geostar.constructionland.analyse.mapper.sptalyresult;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.geostar.constructionland.analyse.entity.alyresult.AlyResultDlMmj;
import com.geostar.constructionland.common.entity.response.LandInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface AlyResultDlmmjMapper extends BaseMapper<AlyResultDlMmj> {

    @Update({" <script> " +
            " <foreach collection=\"landInfos\" item=\"landInfo\" open=\"begin\" close=\";end;\" separator=\";\"> " +
            "  update " +
            "  JSYD_FX_DLMMJFX" +
            "  SET " +
            "   tbmj = #{landInfo.zymj_adjusted,jdbcType=NUMERIC}  " +
            "  WHERE " +
            "   fxid = #{landInfo.fxId,jdbcType=VARCHAR} " +
            " </foreach> " +
            " </script> "})
    void updateTbmjAdjusted(@Param("landInfos") List<LandInfo> landInfoList);
}
